home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 4
/
Apprentice-Release4.iso
/
Source Code
/
Libraries
/
Graphic Elements 3
/
GEQTHack
/
GEAbout.c
next >
Wrap
Text File
|
1995-06-11
|
1KB
|
63 lines
/*
GEAbout.c
Graphic Elements © 1994 About Box
Copyright 1995 by Al Evans. All rights reserved.
6/11/95
*/
#include "GEAbout.h"
#include "SFXCtrlr.h"
#include "SFXProcs.h"
#include "SFXDissolve.h"
// Stuff for fade-in/fade-out about box
pascal Boolean AboutSensorTrack(GEWorldPtr world, GrafElPtr sensor)
{
while (StillDown())
DoWorldUpdate(world, false);
if (sensor->actionProc != nil)
(sensor->actionProc)(world, sensor, 0);
return true;
}
void TakeDownAboutBox(GEWorldPtr world);
pascal void AboutSensorAction(GEWorldPtr world, GrafElPtr sensor, short sensorState)
{
TakeDownAboutBox(world);
}
void PutUpAboutBox(GEWorldPtr world)
{
GrafElPtr abtBox = nil;
GrafElPtr faderGE = nil;
abtBox = NewBasicPICT(world, aboutBoxID, aboutBoxPlane, rAboutBox, transparent, 185, 119);
if (abtBox != nil) {
abtBox->trackingProc = AboutSensorTrack;
abtBox->actionProc = AboutSensorAction;
abtBox->sensorState = 0;
AddSensorToList(world, aboutBoxID, &abtBox->animationRect);
faderGE = DoGESFX(world, 'SFX ', abtBox, SFXDissolve, geDissolveSteps, 0, 60, true, true);
}
}
void TakeDownAboutBox(GEWorldPtr world)
{
GrafElPtr abtBox = nil;
GrafElPtr faderGE = nil;
abtBox = FindElementByID(world, aboutBoxID);
if (abtBox != nil) {
faderGE = DoGESFX(world, 'SFX ', abtBox, SFXDissolve, geDissolveSteps, 0, 60, false, true);
DisposeGrafElement(world, aboutBoxID);
}
}